<!DOCTYPE html>
<!--
     SPDX-License-Identifier: CC-BY-SA-4.0
     SPDX-FileCopyrightText: 2020 seL4 Project a Series of LF Projects, LLC.
-->
<!-- Page last generated 2025-02-20 03:16:15 +0000 -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Loading onto ARM Hardware | seL4 docs</title>

    <!-- Our stylesheet and theme stylesheet.  Contains bootstrap. -->
    <link rel="stylesheet" href="/assets/css/style.css" type="text/css">
    <!-- Font awesome -->
    <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <!-- Pygments syntax highlighting  -->
    <link rel="stylesheet" href="/assets/css/highlighting/trac.css" type="text/css">
    <link rel="icon" type="image/x-icon" href="/assets/favicon.ico"><script defer data-domain="docs.sel4.systems"
	    src="https://analytics.sel4.systems/js/script.js"></script></head>

  <body class="container-fluid">

    



<header>
  <ul class="row menu">
    <li class="col-xs-12 col-md-2" >
            <a href="https://sel4.systems" class="skip-icon">
              <img class="img-responsive" src="/assets/logo-text-white.svg" alt="seL4 logo" />
            </a>
    </li>
    <li class="col-xs-12 col-md-10 menu">
      <nav aria-label="Banner links">
        <h2><a href="/Resources" />Resources</h2>
        <h2><a href="/processes" />Contributing</a></h2>
        <h2><a href="/projects" />Projects</h2>
        <h2><a href="/Tutorials" />Tutorials</h2>
        <iframe title="DuckDuckGo search bar" src="https://duckduckgo.com/search.html?site=docs.sel4.systems&prefill=Search%20sel4.systems" style="overflow:hidden;margin-bottom:10px; padding:0;height:40px;float:right;border-width: 0px"></iframe>
      </nav>
    </li>
  </ul>
  <div class="clear"></div>
  
<div class="breadcrumbs bootstrap hidden-sm-down">
  <nav class="sel-breadcrumb" aria-label="Breadcrumb" >
    <ol class=" list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">
      
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/">
              <span property="name"><b>seL4 Docs</b></span>
            </a>
            <meta property="position" content="1" />
        </li>
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/Hardware/">
              <span property="name"><b>Supported platforms</b></span>
            </a>
            <meta property="position" content="2" />
        </li>
      
        

        
          <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <span property="name">Loading onto ARM Hardware</span>
            <meta property="position" content="3" /></li>
          
    </ol>
  </nav>
  <nav class="sel-version" aria-label="Current Versions">
    <ol class="list-unstyled">
      <li class="list-unstyled text-right" style="margin-left:auto; padding:0rem 0rem;">
        Current versions:</li>
      <li class="list-unstyled text-right">
      <a href="/releases/sel4/13.0.0"><b>seL4-13.0.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/microkit/1.4.1"><b>microkit-1.4.1</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/camkes/camkes-3.11.0"><b>camkes-3.11.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/capdl/0.3.0"><b>capDL-0.3.0</b></a></li>
      </ol>
  </nav>
  <div class='clear'></div>
</div>


</header>

    <main>
      <div class="row">
  <div class="hidden-xs col-sm-4 col-md-3 col-lg-2">
    


<div class="sidebar">
















</div>

  </div>
  <div class="col-sm-8 col-md-9 col-lg-8 main">
    
    <div class="content">
      <h1 id="loading-onto-arm-hardware">Loading onto ARM Hardware</h1>

<p>The ARM platform has many ways to boot into an operating system. Typically there is some low-level ROM code (very specific to each device) that turns on RAM, and turns on enough clocks to be able to load
a second-stage bootloader which does the work. Some do this in several stages, to enable
Trust Zone, HYP-mode etc.</p>

<p>The main bootloaders after the ROM are U-Boot, UEFI, Loki (for Samsung devices) and simpleboot.  Most of these provide Fastboot over USB to allow software loading.</p>

<p>On UEFI for arm: <a href="http://blog.hansenpartnership.com/efitools-for-arm-released/">http://blog.hansenpartnership.com/efitools-for-arm-released/</a> On U-Boot for arm: <a href="http://www.denx.de/wiki/U-Boot">http://www.denx.de/wiki/U-Boot</a></p>

<p>Load from U-Boot, from SD card or flash, or using Fastboot or TFTP. Most applications have two parts: treat the “kernel” part as a kernel, and the “application” part like an initial root disk. If there is only one part to an image (e.g., seL4test for some platforms) treat it like a kernel.</p>

<p>Detailed instructions differ from board to board. See The <a href="index">General Hardware Page</a> for general instructions; it has links to board-specific instructions as well.</p>

<h2 id="fastboot">Fastboot</h2>
<p>Most ARM platforms other than the Beagle Boards that seL4 can use support booting via Fastboot.</p>

<p>To boot via Fastboot, you need to convert the image file produced by the seL4 build system into a U-Boot image.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkimage <span class="nt">-A</span> arm <span class="nt">-a</span> 0x48000000 <span class="nt">-e</span> 0x48000000 <span class="nt">-C</span> none <span class="nt">-A</span> arm <span class="nt">-T</span> kernel <span class="nt">-O</span> qnx <span class="nt">-d</span> INPUT_FILE OUTPUT_FILE
</code></pre></div></div>
<p>The reason we choose QNX is because we exploit the fact that, like seL4, QNX expects to be ELF-loaded. The alternative is to convert our ELF file into a binary file using <code class="language-plaintext highlighter-rouge">objcopy</code>.
The address to use varies from board to board. Unless you change the load address, use these:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left"><strong>Platform</strong></th>
      <th style="text-align: left"><strong>Address</strong></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Arndale, Odroid-X, Odroid-XU</td>
      <td style="text-align: left">0x48000000</td>
    </tr>
    <tr>
      <td style="text-align: left">Sabre Lite</td>
      <td style="text-align: left">0x30000000</td>
    </tr>
    <tr>
      <td style="text-align: left">Panda, Panda ES</td>
      <td style="text-align: left">0x80000000</td>
    </tr>
  </tbody>
</table>

<p>When you have your image, put the board into Fastboot mode (interrupt U-Boot, and type “fastboot”), then do:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fastboot boot OUTPUT_FILE
</code></pre></div></div>
<h2 id="beagle-board">Beagle Board</h2>
<p>You can compile a U-boot for Beagle Board that supports Fastboot, or you can use <code class="language-plaintext highlighter-rouge">dfu-util</code> with the standard U-Boot to transfer the image to the board.</p>

<p>The address that the file downloads to is controlled by the <code class="language-plaintext highlighter-rouge">loadaddr</code> environment variable in U-Boot. You can either download an  ELF file, and then run <code class="language-plaintext highlighter-rouge">bootelf</code> on the U-Boot command-line, or download a U-Boot image file (created with <code class="language-plaintext highlighter-rouge">mkimage</code>) and use <code class="language-plaintext highlighter-rouge">bootm</code> to run it. You may need to take care that the ELF sections or image regions do not overlap with the location of the ELF/image itself, or loaded to non-existent memory address (0x81000000 works fine, but 0x90000000 won’t work on the original Beagle Board since there’s no RAM there).</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dfu-util -D sel4test-image-arm
</code></pre></div></div>

<h2 id="booting-from-sd-card">Booting from SD card</h2>
<p>Pull out the SD card from your board, and put it into an SD card reader attached to your build host. Mount the (MS-DOS) filesystem on the first partition on the SD card and copy your image to it. Unmount the filesystem, and put the card back into your board. Reset the board (by power cycling, or pressing the reset button). To run the image:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mmc init
mmcinfo
fatload mmc 0 ${loadaddr} sel4test-image-arm
bootelf ${loadaddr}
</code></pre></div></div>
<p>You can use</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fatls mmc 0
</code></pre></div></div>

<p>to see what is there. Most U-Boot implementations define a suitable <code class="language-plaintext highlighter-rouge">loadaddr</code> in their environment.</p>

<h2 id="tftp-booting">TFTP booting</h2>
<p>Setting up a DHCP and TFTP server are out of scope for this document. Once you have done that, however, and installed a TFTP-enabled U-Boot on your board if it doesn’t already have one.</p>

<p>You can then power up the device and stop U-Boot’s auto boot feature if
enabled by pressing a key, and do:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dhcp file address
bootelf address
</code></pre></div></div>


    </div>
  </div>
</div>

    </main>
    


<footer class="site-footer">

  <h2 class="footer-heading">seL4 docs</h2>

  <div class="footer-col-wrapper">

    <div class="col-md-2">
      



<ul class="social-media-list">
  <li><a href="https://github.com/sel4"><i class="fab fa-github"></i> <span class="username">sel4</span></a></li><li><a href="https://github.com/sel4proj"><i class="fab fa-github"></i> <span class="username">sel4proj</span></a></li>
</ul>

    </div>

    <div class="col-md-8">
      <ul class="list-unstyled">
        <li>
          This site is for displaying seL4 related documentation.  Pull requests are welcome.
        </li>
        
          <li>
            Site last updated: Fri Feb 7 10:17:38 2025 +1100 ee78c8857c
          </li>
          <li>
                Page last updated: Mon Nov 30 09:25:37 2020 +1100 977ed44f17
          </li>
        
      </ul>
    </div>
    <div class="col-md-2">
<a href="https://github.com/seL4/docs/blob/master/Hardware/GeneralARM.md">View page on GitHub</a>
      <br />
      <a href="https://github.com/seL4/docs/edit/master/Hardware/GeneralARM.md">Edit page on GitHub</a>
      <br />
      <a href="/sitemap">Sitemap</a>
    </div>

  </div>

</footer>

  </body>
</html>
